#!/bin/bash
# Zaitan Module - qdvdauthor Install
# Zaitan Team <http://code.google.com/p/zaitan/>

RMOD_ENGINE='1.0'
RMOD_CATEGORY='Software'
RMOD_SUBCATEGORY='Multimidia'
RMOD_NAME='qdvdauthor'
RMOD_AUTHOR='Zaitan Team'
RMOD_VERSION='1.0'
RMOD_DESCRIPTION='Installs pitivi'


# install qdvdauthor

echo Running $RMOD_NAME...
#/usr/lib/zaitan/modulo/mod-checkInstall


# update
apt-get update
debs='qdvdauthor ogle ogle-gui oggconvert dvdauthor dvdbackup drip movixmaker-2 normalize-audio mp3gain toolame sox vcdimager'


for i in $debs; do

VERIFIQ=$(dpkg -s "$i" 2> /dev/null | grep "Status:" | awk '{ print $3 }')


	if [ "$VERIFIQ" != "ok" ]; then

	apt-get -y install $i
	sleep 1
	
	else
	echo "$i já está instalado"
	sleep 2
fi

done


echo $RMOD_NAME Finibashed...

##Logs
echo $RMOD_NAME-$RMOD_VERSION | tee -a /usr/share/zaitan/logs
/usr/lib/zaitan/modulo/mod-logs
##

exit 0

